5a8f1e
@@ -116,7 +116,9 @@
public class MultiRowRangeFilter extends FilterBase {
       } else {
         if (range.contains(rowArr, offset, length)) {
           currentReturnCode = ReturnCode.INCLUDE;
-        } else currentReturnCode = ReturnCode.SEEK_NEXT_USING_HINT;
+        } else {
+          currentReturnCode = ReturnCode.SEEK_NEXT_USING_HINT;
+        }
       }
     } else {
       currentReturnCode = ReturnCode.INCLUDE;
@@ -151,7 +153,6 @@
public class MultiRowRangeFilter extends FilterBase {
         if (range.stopRow != null)
           rangebuilder.setStopRow(UnsafeByteOperations.unsafeWrap(range.stopRow));
         rangebuilder.setStopRowInclusive(range.stopRowInclusive);
-        range.isScan = Bytes.equals(range.startRow, range.stopRow) ? 1 : 0;
         builder.addRowRangeList(rangebuilder.build());
       }
     }
@@ -418,7 +419,6 @@
public class MultiRowRangeFilter extends FilterBase {
     private boolean startRowInclusive = true;
     private byte[] stopRow;
     private boolean stopRowInclusive = false;
-    private int isScan = 0;
 
     public RowRange() {
     }
@@ -441,7 +441,6 @@
public class MultiRowRangeFilter extends FilterBase {
       this.startRowInclusive = startRowInclusive;
       this.stopRow = (stopRow == null) ? HConstants.EMPTY_BYTE_ARRAY :stopRow;
       this.stopRowInclusive = stopRowInclusive;
-      isScan = Bytes.equals(startRow, stopRow) ? 1 : 0;
     }
 
     public byte[] getStartRow() {
@@ -475,21 +474,21 @@
public class MultiRowRangeFilter extends FilterBase {
         if(stopRowInclusive) {
           return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) >= 0
               && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY) ||
-                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= isScan);
+                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= 0);
         } else {
           return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) >= 0
               && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY) ||
-                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < isScan);
+                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < 0);
         }
       } else {
         if(stopRowInclusive) {
           return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) > 0
               && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY) ||
-                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= isScan);
+                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= 0);
         } else {
           return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) > 0
               && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY) ||
-                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < isScan);
+                  Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < 0);
         }
       }
     }
